<form action="/members/profile-edit-submit" method="post" name="form1" id="form1">
<div class="am-g dnr">
  <div class="am-u-sm-12"><p><input type="tel" style="border-radius:5px;" class="am-form-field am-radius " placeholder="手机号" name="cellphone" id="cellphone" value="<?=$this->info['cellphone']?>" /></p></div>
  <div class="am-u-sm-12"><p><input type="text" style="border-radius:5px;" class="am-form-field am-radius " placeholder="昵称" name="nick_name" id="nick_name" value="<?=$this->info['nick_name']?>" /></p></div>
  <div class="am-u-sm-12">
     <p style=" border:1px solid #CCCCCC;border-radius:5px; padding:5px 0;">
	  <label class="mr"><input type="radio" name="gender" id="gender" value="2" <?php if(2==$this->info['gender']){echo "checked='checked'";}?>></label>女士<label class="mr"><input type="radio" name="gender" id="gender" value="1" <?php if(1==$this->info['gender']){echo "checked='checked'";}?>></label>先生
     </p>
  </div>
  <div class="am-u-sm-12"><p><input type="text" style="border-radius:5px;" class="am-form-field am-radius " placeholder="邮箱" name="email" id="email" value="<?=$this->info['email']?>" /></p></div>
  <div class="am-u-sm-12"><p><input type="password" style="border-radius:5px;" class="am-form-field am-radius" placeholder="密码(不修改请留空)" name="passwd1" id="passwd1" /></p></div>
  <div class="am-u-sm-12"><p><input type="password" style="border-radius:5px;" class="am-form-field am-radius" placeholder="确认密码(不修改请留空)" name="passwd2" id="passwd2" /></p></div>
  <div class="am-u-sm-12"><button type="button" style=" width:100%;border-radius:5px;" class="am-btn am-btn-primary" onclick="submitform()">更新</button></div>
</div>
</form>

<script>
function submitform()
{
	if( document.form1.cellphone.value.length == 0 )
	{
		alert("手机号不能为空");
		return false;
	}
	
	if( document.form1.passwd1.value != document.form1.passwd2.value )
	{
		alert("您输入的两次密码不一致，请重新输入");
		return false;
	}
	
	if( document.form1.nick_name.value.length == 0 )
	{
		alert("昵称不能为空");
		return false;
	}
	
	form1.submit();
}
</script>